package com.wkk.log.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wkk.log.dto.LogQueryDto;
import com.wkk.log.dto.OperationDto;
import com.wkk.log.entity.UserOperation;
import com.wkk.log.mapper.LogMapper;
import com.wkk.log.service.LogService;
import org.springframework.stereotype.Service;

/**
 * @author : WangKeKe
 * @date : 2020/9/28 15:23
 * Description : 日志接口实现类
 */

@Service
public class LogServiceImpl extends ServiceImpl<LogMapper, UserOperation> implements LogService {

    @Override
    public Page<OperationDto> queryPage(Integer pageNo, Integer pageSize, LogQueryDto logQueryDto) {
        Page<OperationDto> page = new Page<>(pageNo, pageSize);
        page.setRecords(baseMapper.queryPageList(page, logQueryDto));
        return page;
    }
}
